1. Field of the Invention
The invention relates generally to a data update method and a flash memory apparatus using the method, and more particularly, to a data update method that improves the data update efficiency for a flash memory apparatus.
2. Description of the Related Art
A flash memory apparatus typically comprises a memory controller and a plurality of blocks for storing data, each block comprises a plurality of pages. When a specific page of a block of a flash memory apparatus is to be updated, it's first determined whether the page has already been written to. If not, the page is directly written (updated) with the new data. If so, the page can not be overwritten. Therefore, a new blank block is utilized for data update procedure.
For example, referring to FIG. 1 where an external computer 10 and a flash memory apparatus 11 are shown. The flash memory apparatus 11 comprises a memory controller 12 for data retrieving and writing. In FIG. 1, the external computer 10 provides a data X to be written into the flash memory apparatus 11. Assume that the data X is to be written into a page 1 of a block b13 of the flash memory apparatus 11. In this case, the memory controller 12 can directly write the data X into the page 1 since the page 1 is blank (writable). However, if the data X is to be written into a page 2 of the block b13 of the flash memory apparatus 11, the memory controller 12 can't write the data X on it since the page 2 has already been written to. Therefore, a blank block b14 is required. With the blank block b14, the memory controller 12 transfers the data from all pages other than the page 2 of the block b13 to the corresponding pages of the blank block b14, and writes the data X into the page 2 of the blank block b14, thereby updating the page 2 of the block b13. After the block b13 is updated, the original block b13 is completely erased as a new blank block for future use.
The above data update mechanism is based on Mother/Child relationship between blocks, with the original block b13 that is to be updated as a mother block and the new blank block b14 used for the update procedure as a child block. However, the number of the blocks of a flash memory apparatus is limited. Therefore, the above data update mechanism is inefficient and costly if there are too many blocks that require updating (since more blank blocks are required for data update procedures).